//
//  UITabBarController+Lc.h
//  18Birdies
//
//  Created by weihua on 2016/12/15.
//  Copyright © 2016年 Lc. All rights reserved.
//

#import <UIKit/UIKit.h>

UIKIT_EXTERN const NSNotificationName UITabBarControllerReClicked;
UIKIT_EXTERN const NSNotificationName UITabBarControllerSelected;
UIKIT_EXTERN const NSString* UITabBarControllerSelectedIndexKey;
UIKIT_EXTERN const NSString* UITabBarControllerKey;

@interface UITabBarController (Lc)

- (void)switchToTabIndex:(NSUInteger)tabIndex
      pushViewController:(UIViewController*)toViewController;

- (void)switchToTabIndex:(NSUInteger)tabIndex
      pushViewController:(UIViewController*)toViewController
                animated:(BOOL)animated;
- (void)switchToTabIndex:(NSUInteger)tabIndex
     pushViewControllers:(NSArray*)viewControllers
                animated:(BOOL)animated;

- (void)popAllToRootViewController;

- (__kindof UIViewController*)viewControllerAtIndex:(NSUInteger)tabIndex;
- (__kindof UIViewController*)topViewControllerAtIndex:(NSUInteger)tabIndex;
- (__kindof UIViewController*)rootViewControllerAtIndex:(NSUInteger)tabIndex;
- (NSInteger)indexForViewController:(UIViewController*)viewController;

@property (nonatomic, strong, readonly)__kindof UIViewController* selectedTopViewController;
@property (nonatomic, strong, readonly)__kindof UIViewController* selectedRootViewController;

@end
